package polymorphic_case;

public class Test {
    public static void main(String[] args) {
        //创建对象并调用方法

        Person p = new Person("老王", 30);
        Dog d = new Dog(2, "黑");
        p.keepPet(d, "骨头");

        Person p2 = new Person("老李", 25);
        Cat c = new Cat(3, "灰");
        p.keepPet(c, "鱼");
    }
}
